Generally, 3D modeling of complex buildings are accomplished by simplifying a complex polygon into simply polygons, but the 3D model generated in this method has poor accuracy of and fails in presenting details of buildings. Besides, a plenty of manual intervention is necessary. According to prior art, the boundaries of a building are extracted by using two dimensional (2D) data, and then the height properties of the building are read to generate the walls of the building, next, the roof is simplified in some degree and a 3D model of the roof is built, finally, the model is output to the 3D engine to perform rendering. Several methods of prior art are introduced as follows:
A solution is provided by Xiaofei, XIA based on his study on “3D modeling of buildings by using GIS (Geographic Information System)data” and “semi-automatic 3D modeling of buildings by using GIS data”, which divides the process of modeling into main body modeling and roof modeling. As for the main body modeling, the facades of the mold of the building are generated by using polygon data and elevation data in the plane graph. In order to generate the facades, every boundary of polygons should be traversed, for any boundary of polygons, two vertexes corresponding to the elevation are created on the basis of elevation data thereof and then a quadrangular facade is formed, as shown in FIG. 1. According to the flow of roof modeling shown in FIG. 2, the modeling is accomplished by building a mathematical model according to the type and parameters of the roof inputted by users and transforming the roof into simple polygons. In the solution, the roof can be any of the following four types, i.e. gabled roofs, flat roofs, radial roofs and arbitrary curves-swept roofs.
The flow of the modeling of a gabled roof is as follows:
1) assigning a longest edge (Lmax) among all six edges of the gabled roof to be the direction of the length and beam of Box1 (P(1), P(6), P(3b), P(2)), as shown in FIG. 3;
2) selecting the longer edge between the two edges connecting to Lmax to be the length of Box2 (P(1a), P(2a), P(3), P(4)) and the shorter edge to be the width of Box 1 (W_Box 1), as shown in FIG. 3 where some auxiliary points are added wherein P (1a) denotes the intersection of the line segment P(4)P(5) and the vertical median line of Box 2; P (2a) denotes the intersection of the vertical median line of Box 2 and the line segment P(2)P(3); P(3b) denotes the intersection of the line segment P(5)P(2) and the line segment P(2)P(3);3) assigning os with the result of L_box2 minus W_box1 to and assigning a=os/W_Box1, Box 2 being regarded as a sub roof when a is greater than 0.1 while Box 2 being regarded as an extension of the main roof when a is less than or equal to 0.1, as shown in FIG. 3d; 4) determining the relation between after the beam of the additional area and the beam of the main area after the division, if the shared line segment of the additional area and main area is parallel to the beam of the main area (i.e. the length of the rectangle of the main area), the beam of the additional area is perpendicular to the beam of the main area. If the shared line segment is perpendicular to the beam of the main area, the beam of the additional area is parallel to the beam of the main area;5) generating a gabled roof for the rectangle where the main beam is located firstly after the division is completed, and then generating a roof for the rectangle where the auxiliary beam is located.
The flow of the modeling of a flat roof is as follows:
1) detecting the polygon inlay status in the boundary of the flat roof, i.e., the number of the polygons in the flat roof, and then storing information of the inlay status into a layered structure of linked lists;
2) traversing every polygon located in each polygon in this layer, in this manner, a whole layered structure of polygons of the roof is obtained;
3) assigning a height value to each polygon and a 3D model is generated as shown in FIG. 5.
The Flow of the Modeling of a Radial Roof
The modeling is accomplished by computing the gravity center of the boundary of the polygon and generating polygon facets according to the height value h of the top assigned by the user after the gravity center is acquired, and the procedures thereof are as follows:
1) computing the gravity center of the boundary of the polygon with the following formula:
            x      c        =                  1        n            ⁢                        ∑                      i            =            1                    n                ⁢                  x          i                      ,            y      c        =                  1        n            ⁢                        ∑                      i            =            1                    n                ⁢                  y          i                    2) determining the coordinates of the radial center of the gravity according to the height value of the top assigned by the user T(xc, yc, h).3) generating triangular facets in accordance with the point T and vertexes of the boundary, as shown in FIG. 6.
The flow of the modeling of an arbitrary curves-swept roof is as follows:
1) setting a start point and a end point to each curve, a width of the curved surface where the curves is located, and a sweep length of each curve.
2) generating polygon facets according to these attributions and then generating bodies by using these facets, such that the modeling is accomplished, as shown in FIGS. 7-8.
The generated roof and facades should be jointed to each other, the primary algorithm of which comprises recalculation of elevation values of key points. For the flat roof, the roof can be generated at the height of the generated facades directly, but for the irregular shaped roofs, such as dual-pitch roofs, mono-pitch roofs, domes, the elevation information of facades should be recalculated and the polygons of facades should be regenerated, as shown in FIGS. 9, 10, 11.
Weili, DING proposed an automatic modeling solution for buildings in her thesis named <Automatic modeling of building and infrared simulation based on OpenFlight API>, in which information of the shadows and topography extracted from high-resolution aerial photographs supplied by Google Earth and OpenFlight API is used, which comprise:
1. assuming that all buildings in the city have a structure of a flat roof and rectangular facades, and regions with flat terrain in the city locate in an identical plane. All the necessary parameters for the modeling of buildings can be acquired form aerial photographs, such as vertexes of polygons of the roof, height of buildings and so on;2. selecting a polygon tool (as shown in FIG. 13) from the selection tool bar shown in FIG. 12 after the loading of the images from Google Earth, clicking and saving vertexes of polygons of the roof manually;3. determining the height of buildings by using information of a plenty of shadows in the images;4. mapping the aerial photographs supplied by Google Earth to the roofs as patterns, and accomplishing the modeling in the manner, as shown in FIG. 14.
Baoxuan, JIN proposed a method for constructing a building model by using a layered overlay method based on triangle division in his thesis named <Research on a method for constructing a 3D city model and visualization>. In 2D GIS, an object is represented by linking its geometrical information and its attribute information via interior identifiers. In view of the complexity of the 3D buildings, an indicator is supplemented to indicate the identifier of each layer, that is, a building is divided into several layers, generally two layers, and each layer is further divided into walls and roofs; if the building is more complex, it can be divided into three or more layers and each layer is further divided into walls and roofs; the layered model of a building is shown in FIG. 15. As demonstrated in FIG. 16, the polygon boundary of walls and roofs of a building is divided into triangles. If a wall or a roof of the building is a curved surface, a plurality of featured points should be gathered or inserted, and then a triangular mesh is formed inside the boundary of the polygon with a certain rule so as to realize the triangle division. After that, a 3D model is generated according to information of triangles.
Overall, the methods provided by prior art have poor accuracy of and fails in presenting details of buildings, such as patios, irregular buildings and so on. Furthermore, they also need a plenty of manual intervention, for example, in the research of Xiaofei, XIA, “3D modeling of buildings by using data of GIS”, several auxiliary points are needed when processing the roof, information of buildings needs to be extracted from Google Earth manually in the research on <Automatic modeling of building and infrared simulation based on OpenFlight API> by Weili, DING, and auxiliary points is necessary for triangle division in <research on methods for constructing a 3D city model and visualization> by Baoxuan, JIN. The reasons for the need of manual intervention are as follows:
1. All the solutions tend to accomplish the modeling by transforming the complex buildings to simple and regular shapes, that is, simplifying complex polygons to simple ones, which certainly leads to a loss of information of buildings, a failure of detail presentation and low accuracy.2. Modeling of some complex buildings is unable to be accomplished because fitting simple polygons to them is very hard.3. In the point of view of mathematics, the shapes of a building is composed of many line segments. If a building comprises both arcs and straight lines, different mathematical models should be set for them respectively. If division is to be performed, human decision is necessary to find out the dividing points between the arcs and straight lines so as to ensure the accuracy of division. Therefore, the modeling of above methods is inefficient due to the need of a plenty of manual intervention.
In conclusion, a solution for modeling complex buildings is in great desire so as to overcome the defects such as low accuracy and inefficiency above.